<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>11盒子模型margin折叠</title>
    <style>
        .box1 {
            width: 300px;
            height: 300px;
            background-color: pink;

            margin-bottom: 30px;

        }

        .box2 {
            width: 500px;
            height: 500px;
            background-color: skyblue;
            margin-top: 50px;
        }
    </style>
</head>

<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>

</html>